//
//  YDHoldPositionModel.m
//  PeiZiWangBei
//
//  Created by 巨彦新 on 2017/12/5.
//  Copyright © 2017年 LK-IOS. All rights reserved.
//

#import "YDHoldPositionModel.h"

@implementation YDHoldPositionModel

-(NSString *)pzHoldProfitOrLoss
{
    if ([self.holdProfitOrLoss floatValue] == 0) {
        return @"0.00";
    }else if ([self.holdProfitOrLoss floatValue]>0){
        NSString *floatString = [NSString stringWithFormat:@"%.2f",[self.holdProfitOrLoss floatValue]];
        return [NSString countNumAndChangeformat:floatString];
    }else{
        NSString *string = [self.holdProfitOrLoss pz_stringNumberByMultiplyingBy:@"-1"];
        return [NSString stringWithFormat:@"-%@" , [NSString countNumAndChangeformat:string]];
    }
}


-(NSString *)pzTotalApplyAmount
{
    if (!self.totalApplyAmount) {
        return @"---";
    }else{
        NSString *floatString = [NSString stringWithFormat:@"%.2f",[self.totalApplyAmount floatValue]];
        return [NSString countNumAndChangeformat:floatString];
    }
}

-(NSString *)pzTodayApplyAmount
{
    if (!self.todayApplyAmount) {
        return @"---";
    }else{
        NSString *floatString = [NSString stringWithFormat:@"%.2f",[self.todayApplyAmount floatValue]];
        return [NSString countNumAndChangeformat:floatString];
    }
}

-(NSString *)pzFrozenAmount
{
    if (!self.frozenAmount) {
        return @"---";
    }else{
        NSString *floatString = [NSString stringWithFormat:@"%.2f",[self.frozenAmount floatValue]];
        return [NSString countNumAndChangeformat:floatString];
    }
}

-(NSString *)pzDeferredAmount
{
    if (!self.deferredAmount) {
        return @"---";
    }else{
        NSString *floatString = [NSString stringWithFormat:@"%.2f",[self.deferredAmount floatValue]];
        return [NSString countNumAndChangeformat:floatString];
    }
}


@end
